﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.GroupCommands.CUIPickIntentCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.GroupCommands.Resources;
using EngineeringInternalExtension;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.GroupCommands;

internal class CUIPickIntentCmd : TxRibbonGroupButtonCommand
{
  public CUIPickIntentCmd() => ((TxButtonCommand) this).SetStayEnabledInSemiModalMode(true);

  public virtual string Category => GroupCommandsStringTable.PICK_INTENT_GROUP_CMD_CATEGORY;

  public virtual string Description => GroupCommandsStringTable.PICK_INTENT_GROUP_CMD_DESCRIPTION;

  public virtual string Name => GroupCommandsStringTable.PICK_INTENT_GROUP_CMD_NAME;

  public virtual string Tooltip => GroupCommandsStringTable.PICK_INTENT_GROUP_CMD_TOOLTIP;

  public virtual string Bitmap => "GroupCommands.Resources.PickIntentSmall.bmp";

  public virtual string LargeBitmap => "GroupCommands.Resources.PickIntentBig.png";

  private TxPickIntentEx GetNextPickIntent()
  {
    TxPickIntentEx pickIntent = TxGraphicViewerEx.PickIntent;
    TxPickIntentEx nextPickIntent = (TxPickIntentEx) 0;
    if (pickIntent == null)
      nextPickIntent = (TxPickIntentEx) 2;
    else if (pickIntent == 2)
      nextPickIntent = (TxPickIntentEx) 1;
    else if (pickIntent == 1)
      nextPickIntent = (TxPickIntentEx) 3;
    else if (pickIntent == 3)
      nextPickIntent = (TxPickIntentEx) 0;
    return nextPickIntent;
  }

  public virtual void Execute(object cmdParams)
  {
    TxGraphicViewerEx.PickIntent = this.GetNextPickIntent();
  }
}
